import JsonSeriable from "@/lib/field/base/JsonSeriable"
import JsonSeriType from "@/lib/field/base/JsonSeriType"
export default class FlowApp extends JsonSeriable{
	
	#flowInfo ;
	#nodeList ;
	#lineList ;
	#options;
	
	constructor(flowInfo, nodeList, lineList,options){
		super();
		this.#flowInfo = flowInfo || {};
		this.#nodeList = nodeList || [];
		this.#lineList = lineList || [];
		this.#options = options || {};
		super.seriType = new JsonSeriType("FlowApp","flow");
	}
	
	// toSeriStr(){
	// 	let ret={
	// 		"flowInfo":this.#flowInfo,
	// 		"nodeList":this.#nodeList,
	// 		"lineList":this.#lineList,
	// 		"options":this.#options
	// 	};
	// 	return jsonSeriableUtil.toSeriStr(ret,{
	// 		"type":"FlowApp",
	// 		"page":"flow"
	// 	});

	// }
	genSeriObj(){
		let ret={
			"flowInfo":this.#flowInfo,
			"nodeList":this.#nodeList,
			"lineList":this.#lineList,
			"options":this.#options
		};
		return ret;
	}
	
	seriObj(obj){
		
		this.#flowInfo =  obj.flowInfo;
		this.#nodeList =  obj.nodeList;
		this.#lineList =  obj.lineList;
		this.#options =  obj.options;
		
	}
	
	genProdObj(){
		return this.genSeriObj();
	}
	
	get flowInfo(){
		return this.#flowInfo;
	}
	
	set flowInfo(v){
		this.#flowInfo = v ;
	}
	
	get nodeList(){
		return this.#nodeList;
	}
	
	set nodeList(v){
		this.#nodeList = v ;
	}
	
	get lineList(){
		return this.#lineList;
	}
	
	set lineList(v){
		this.#lineList = v ;
	}
	
	get options(){
		return this.#options;
	}
	
	set options(v){
		this.#options = v ;
	}
}